﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace AsteroidWar
{
    public class Boss : Hostile
    {
        
        public Vector2 gunOffset= new Vector2(100,140);
        public float health=100;
        private static float bossSpeed = 100f;

        private Random rand = new Random();        

        public Boss(
            Texture2D texture,
            Rectangle initialFrame,
            int frameCounts,
            Vector2 location,
            Rectangle screenBound
            )
            : base(texture, initialFrame, location, frameCounts, 30, bossSpeed)
        {
            
        }

        public Vector2 RotateVector2(Vector2 point, float radians)
        {
            float cosRadians = (float)Math.Cos(radians);
            float sinRadians = (float)Math.Sin(radians);

            return new Vector2(
                point.X * cosRadians - point.Y * sinRadians,
                point.X * sinRadians + point.Y * cosRadians);
        }

        
        public override bool IsActive()
        {
            if (Destroyed)
            {
                return false;
            }

            return true;
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
            sprite.Rotation = 0f;
        }

        public override void Draw(SpriteBatch spriteBatch)
        {
            if (IsActive())
            {
                sprite.Draw(spriteBatch, 1.0f);
            
            }
        }

    }
}
